import Vue from 'vue'
import { mapActions, mapGetters } from 'vuex'
import router from './vue/router'
import store from './vue/store'
import Web from './web/Index.vue'
import adminCmpt from './web/pages/admin-cmpt'

Vue.config.productionTip = false

//尺寸：medium、small、mini
Vue.prototype.$ELEMENT = { size: 'small' }

Vue.use(adminCmpt)
Vue.mixin({
  computed: {
    ...mapGetters({
      multLang: 'lang/get',
      tplLang: 'lang/tpl',
      optionList: 'option/list',
      optionTree: 'option/tree',
      optionMap: 'option/map'
    })
  },
  methods: {
    ...mapActions({
      setOption: 'option/set'
    })
  }
})
new Vue({
  router,
  store,
  render: h => h(Web)
}).$mount('#web')
